<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content ">
		<div class="row">
			<div class="col-sm-14">
				<div class="ibox float-e-margins">
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="signupForm">
							<input id="id" name="id" th:value="${saleOrder.id}"  type="hidden">
							<fieldset>
								<legend>基础信息</legend>
								<div class="form-group">
									<label class="col-sm-2 control-label">标题：</label>
									<div class="col-sm-10">
										<input id="title" name="title" th:value="${saleOrder.title}" class="form-control" type="text">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">顾客：</label>
									<div class="col-sm-4">
										<input id="customer" name="customer" th:value="${saleOrder.customer}" class="form-control" type="text">
									</div>
									<label class="col-sm-2 control-label">手机：</label>
									<div class="col-sm-4">
										<input id="phone" name="phone" th:value="${saleOrder.phone}" class="form-control" type="text">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">备注：</label>
									<div class="col-sm-10">
									<textarea id="remarks" name="remarks" th:text="${saleOrder.phone}" class="form-control"
									></textarea>
									</div>
								</div>
							</fieldset>
							<fieldset>
								<legend>货品信息</legend>
								<input id="removeIds" type="hidden"/>
								<div class="form-group" th:each="info : ${saleOrder.saleOrderInfoDOS}">
									<label class="col-sm-2 control-label">货名：</label>
									<div class="col-sm-3">
										<input id="infoId" th:attr="name=saleOrderInfoDOS[+${infoStat.index}+].id" th:value="${info.id}" type="hidden">
										<input id="product" th:attr="name=saleOrderInfoDOS[+${infoStat.index}+].productName" th:value="${info.productName}" class="form-control" type="text" placeholder="输入货名">
									</div>
									<div class="col-sm-3">
										<input id="norm" th:attr="name=saleOrderInfoDOS[+${infoStat.index}+].productNorm" th:value="${info.productNorm}" class="form-control" type="text" placeholder="输入规格">
									</div>
									<div class="col-sm-3">
										<input id="count" th:attr="name=saleOrderInfoDOS[+${infoStat.index}+].count" th:value="${info.count}" class="form-control" type="text" placeholder="输入数量">
									</div>
									<button type="button" class="col-sm-1 btn  btn-sm" onclick="removeOrderProduct(this)">
										<i class="fa fa-remove"></i>
									</button>
								</div>
								<div class="form-group" >
									<div class="col-sm-8 col-sm-offset-10">
										<button type="button" class="btn" onclick="addOrderProduct(this)">添加</button>
									</div>
								</div>
							</fieldset>

																					<div class="form-group">
								<div class="col-sm-8 col-sm-offset-3">
									<button type="submit" class="btn btn-primary">提交</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
	</div>
	</div>
	<div th:include="include::footer"></div>
	<script type="text/javascript" src="/js/appjs/jiashan/saleOrder/edit.js">
	</script>
</body>
</html>
